//
//  DGAccount.h
//  DGAccountKit
//
//  Created by Jinxiao on 11/19/13.
//  Copyright (c) 2013 debugeek. All rights reserved.
//

#import "DGAccountCredential.h"


#define userPhone @"userPhone"
#define userURL @"user3rdURL"
extern NSString * const DGAccountKeyIdentifier;
extern NSString * const DGAccountKeyUserID;
extern NSString * const DGAccountKeyUsername;
extern NSString * const DGAccountKeyPassword;

@interface DGAccount : NSObject

@property (readonly, nonatomic, strong) NSString *identifier;

@property (readwrite, nonatomic, strong) NSString *userID;

@property (readwrite, nonatomic, strong) NSString *username;

@property (readwrite, nonatomic, strong) NSString *password;

@property (nonatomic,copy) NSString *phone;

@property (readwrite,nonatomic,copy) NSString *pickpic;
@property (readwrite,nonatomic,copy) NSString *name;
@property (readwrite,nonatomic,copy) NSString *user3rdURL;

@property (readwrite, nonatomic, strong) DGAccountCredential *credential;
+(DGAccount *)currentAccount;

- (BOOL)isCurrentAccount;

- (BOOL)validateAccount;

- (NSDictionary *)dictionaryRepresentation;
- (void)updateWithDictionary:(NSDictionary *)dictionary;

- (void)clearPhone;
- (void)clear3rdURL;
@end
